//
//  HelpPage.swift
//  Casecord
//
//  Created by baozi on 2024/1/10.
//

import SwiftUI

struct HelpPage: View  {
    @EnvironmentObject var route: Router
    @State private var isContactUsShow: Bool = false
    var body: some View {
        ZStack {
            ScrollView {
                Color.clear.frame(height: 40)
                CustomMenuItem(title: "Rate Us", image: "star") {
                    route.open(Env.current.appStoreUrl)
                }
                .paddingTop(10)
                CustomMenuItem(title: "Connect Us", image: "person.3.sequence") {
                    withAnimation {
                        isContactUsShow = true
                    }
                    
                }
                .paddingTop(10)
            }
            
            if isContactUsShow {
                ConnectUSPage(isShow: $isContactUsShow)
                    .zIndex(1)
            }
            
        }
    }
}

#Preview {
    HelpPage()
}
